package com.ruoyi.petSys.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.petSys.domain.PetType;
import com.ruoyi.petSys.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2024</p>
 * <p>公司: 中科天巡</p>
 *
 * @version: 1.0
 * @author: WangChaoTao
 * @date 2024/3/27
 */
@RestController
@RequestMapping("otherComm")
public class OtherCommController  extends BaseController {
    @Autowired
    private IPetTypeService petTypeService;
    @GetMapping("/petTypeList")
    public TableDataInfo list(PetType petType)
    {
        startPage();
        List<PetType> list = petTypeService.selectPetTypeList(petType);
        return getDataTable(list);
    }

    @GetMapping("/getBaseUrl")
    public String getBaseUrl()
    {
        return System.getProperty("user.dir")+System.getProperty("file.separator");
    }
}